This invention relates to temperature measurements taken at a coke guide or coke oven using a pyrometer with a window cleanliness monitor capable of detecting environmentally caused errors and automatically correcting same.